<template>
  <el-card>
    <div slot="header" class="card-header">
      <span>{{ this.$route.meta.title }}</span>
    </div>
    <TableA class="mgb"></TableA>
    <Table class="mgb"></Table>
    <el-card shadow="never" class="mgb">
      <Search></Search>
    </el-card>
    <el-card class="echart mgb" shadow="never">
      <EchartBar></EchartBar>
    </el-card>
    <el-row :gutter="20">
      <el-col :span="12">
        <el-card class="echart radar" shadow="never">
          <div slot="header" class="card-header">
            <span>占比分布图</span>
            <el-date-picker
              v-model="valueA"
              type="year"
              placeholder="选择年"
              :picker-options="pickeroptions"
            >
            </el-date-picker>
          </div>
          <EchartPie></EchartPie>
        </el-card>
      </el-col>
      <el-col :span="12">
        <el-card class="echart radar" shadow="never">
          <div slot="header" class="card-header">
            <span>新增折线图</span>
            <el-date-picker
              v-model="valueB"
              type="year"
              placeholder="选择年"
              :picker-options="pickeroptions"
            >
            </el-date-picker>
          </div>
          <EchartLine></EchartLine>
        </el-card>
      </el-col>
    </el-row>
  </el-card>
</template>

<script>
import Table from './components/Table'
import TableA from './components/TableA'
import Search from './components/Search'
import EchartBar from './components/EchartBar'
import EchartPie from './components/EchartPie'
import EchartLine from './components/EchartLine'
export default {
  components: {
    Table,
    TableA,
    Search,
    EchartBar,
    EchartPie,
    EchartLine
  },

  data() {
    return {
      valueA: 1546272000000,
      valueB: 1577808000000,
      pickeroptions: {
        disabledDate: time => {
          if (Date.now() <= time) {
            return true
          }
          return false
        }
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.mgb {
  margin-bottom: 20px;
}
/deep/ .el-card__body {
  text-align: center;
}
.echart {
  /deep/ .el-card__body {
    height: 500px !important;
  }
}
.radar {
  /deep/ .el-card__body {
    height: 700px !important;
  }
}
</style>
